<?xml version="1.0" encoding="utf-8"?>

<EFFECT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns ="urn:dsfx0">

  <CONSTANT_BUFFER>
    <NAME>cbAmbiance_Background_Camera</NAME>
  </CONSTANT_BUFFER>
  <CONSTANT_BUFFER>
    <NAME>cbAmbiance_Ground_Auto</NAME>
  </CONSTANT_BUFFER>
  <CONSTANT_BUFFER>
    <NAME>cbAmbiance_Sun_Auto</NAME>
    <NEEDS_OPTION>GROUND_SPHERE</NEEDS_OPTION>
  </CONSTANT_BUFFER>
  <CONSTANT_BUFFER>
    <NAME>cbAmbiance_Ground_Background</NAME>
  </CONSTANT_BUFFER>
    
  <TECHNIQUE>
    <NAME>Plane</NAME>
    <PASS>
      <NAME>Pass0</NAME>

      <STREAMS>
        <STREAM>
          <STAGES>Vertex_Fragment</STAGES>
          <VARYING>
            <NAME>vRay</NAME>
            <TYPE>float3</TYPE>
            <QUALIFIER>smooth</QUALIFIER>
          </VARYING>
        </STREAM>
      </STREAMS>

      <SHADER_OPTIONS>
        <SHADER_OPTION>
          <NAME>BACKGROUND_RAY</NAME>
          <OPTION_VALUE>1</OPTION_VALUE>
        </SHADER_OPTION>
      </SHADER_OPTIONS>
      
      <COMMONS>streams varyings Ambiance_Background_CBCamera</COMMONS>
      <VERTEX_STAGE>Ambiance_Background_MainVS</VERTEX_STAGE>
      <FRAGMENT_STAGE>Ambiance_Background_DeclarePS Ambiance_Ground_BackgroundPS</FRAGMENT_STAGE>
    </PASS>
  </TECHNIQUE>

  <TECHNIQUE>
    <NAME>Sphere</NAME>
    <PASS>
      <NAME>Pass0</NAME>

      <STREAMS>
        <STREAM>
          <STAGES>Vertex_Fragment</STAGES>
          <VARYING>
            <NAME>vTexCoord</NAME>
            <TYPE>float2</TYPE>
            <QUALIFIER>smooth</QUALIFIER>
          </VARYING>
        </STREAM>
      </STREAMS>

      <SHADER_OPTIONS>
        <SHADER_OPTION>
          <NAME>BACKGROUND_TEXCOORD</NAME>
          <OPTION_VALUE>1</OPTION_VALUE>
        </SHADER_OPTION>
        <SHADER_OPTION>
          <NAME>GROUND_SPHERE</NAME>
          <OPTION_VALUE>1</OPTION_VALUE>
        </SHADER_OPTION>
      </SHADER_OPTIONS>

      <COMMONS>streams varyings Ambiance_Background_CBCamera</COMMONS>
      <VERTEX_STAGE>Ambiance_Background_MainVS</VERTEX_STAGE>
      <FRAGMENT_STAGE>Ambiance_Background_DeclarePS RayTracer_Helpers Earth_Helpers Ambiance_Ground_BackgroundPS</FRAGMENT_STAGE>
    </PASS>
  </TECHNIQUE>
</EFFECT>


